
<script>
	export default {
		data(){
			return{
				navHeight:0,
			}
		},
		mounted(){
			if(this.navHeight === 0 || !uni.getStorageSync('height')){
				let sysInfo = tt.getSystemInfoSync();
				let  statusBarHeight = sysInfo.statusBarHeight; 
				// 胶囊位置信息
				let rect = tt.getMenuButtonBoundingClientRect();
				// 导航栏高度
				let navBarHeight = (rect.top - sysInfo.statusBarHeight) * 2 + rect.height;
				// 自定义导航栏的高度
				let height = sysInfo.statusBarHeight + navBarHeight;
						
				let screenWidthPx = sysInfo.screenWidth; 
				this.navHeight = (height / screenWidthPx) * 750;
				uni.setStorageSync('height', this.navHeight)
			}else{
				this.navHeight = uni.getStorageSync('height')
			}	
		},
		
	
	}
</script>
